Trusted kernel-based anti-attack data processor

ABSTRACT

The present disclosure provides trusted kernel-based anti-attack data processors. One exemplary processor comprises: a trusted kernel exception vector table configured to provide a handling entry for kernel switching; a trusted kernel stack pointer register storing a trusted kernel stack pointer that points to a trusted kernel stack space; and a trusted zone in the trusted kernel stack space, the trusted zone including a program status register storing a flag bit of a starting kernel for the kernel switching, a program pointer, and a general register. When the data processor performs kernel switching from a non-trusted kernel to a trusted kernel, the trusted kernel locates the handling entry for the kernel switching and performs the switching. An underlying software protection mechanism can be provided for switching entries of a trusted kernel. Therefore, security during switching processes between a trusted kernel and a non-trusted kernel can be improved.

CROSS REFERENCE TO RELATED APPLICATION

This application claims priority to International Application No. PCT/CN2018/096759 filed Jul. 24, 2018, which claims the benefits of priority to Chinese Application No. 201710648239.3, filed on Aug. 1, 2017, both of which are incorporated herein by reference in their entireties.

TECHNICAL FIELD

The present disclosure relates to the field of information security technologies, and in particular, to trusted kernel-based anti-attack data processors.

BACKGROUND

With the development of the mobile networks and the Internet of Things, as well as the extensive application of information technologies in production, operation and management, the society increasingly relies on network and information systems. On the other hand, the frequent occurrence of virus invasions, hacker intrusions, information thefts, and other events has made system security an increasingly important issue. Accordingly, system security has attracted more and more attention.

At present, security of system information is provided to some extent by the introduction of safe mode. In safe mode, hardware isolation is implemented in the system. The system kernel is the basis of the whole system. The kernel runs at the highest privilege level of the whole system. It manages and controls underlying hardware resources and provides securely isolated resource abstraction and access interfaces for upper-layer application programs. An operating system for running a trusted kernel in the safe mode is independent of an operating system running in a non-safe mode. The trusted kernel provides security authentication, encryption and decryption, sensitive data storage, and other services. Physical isolation through hardware security components ensures that an operating system in the non-safe mode cannot directly access resources in the safe mode, thus reducing the attack surface.

However, an attacker may still be able to, by various other means, obtain sensitive data by attacking a trusted kernel in the non-safe mode. Sometimes the attacks can even cause system crashes. Therefore, there is a need for techniques for implementing program control in a trusted kernel, so as to guard against such attacks.

SUMMARY

In light of the above problems, the present disclosure provides trusted kernel-based anti-attack data processor. According to some embodiments of the present disclosure, the trusted kernel-based anti-attack data processor can provide an underlying software protection mechanism in a trusted kernel, thereby enhancing the security of the trusted kernel.

According to some embodiments, the present disclosure provides trusted kernel-based anti-attack data processors. One exemplary processor comprises: a trusted kernel exception vector table configured to provide a handling entry for kernel switching; a trusted kernel stack pointer register configured to store a trusted kernel stack pointer that points to a trusted kernel stack space; and a trusted zone in the trusted kernel stack space, the trusted zone including a program status register configured to store a flag bit of a starting kernel for the kernel switching, a program pointer, and a general register. When the data processor performs kernel switching from a non-trusted kernel to a trusted kernel, the trusted kernel locates the handling entry for the kernel switching and performs the switching.

In some embodiments, the handling entry for kernel switching includes at least one of a kernel switching instruction exception entry and a trusted interrupt handling entry. In some embodiments, the trusted kernel locates the handling entry for the kernel switching and performs the switching by at least one of a kernel switching instruction, a kernel switching return instruction, or an interrupt response.

In some embodiments, when the trusted kernel performs the switching by the kernel switching return instruction, it can be determined, according to a flag bit of a starting kernel in the program status register, whether to return to the starting kernel or stay in the current kernel. In some embodiments, the trusted kernel locates the kernel switching instruction exception entry through an entry vector table called by a cross-kernel task.

In some embodiments, the trusted kernel locates the trusted interrupt handling entry through the trusted kernel exception vector table.

In some embodiments, when the trusted kernel is switched to the non-trusted kernel in response to a non-trusted interrupt, the trusted kernel saves the trusted zone in the trusted kernel stack space. After the non-trusted kernel handles the non-trusted interrupt, the non-trusted kernel is switched to the trusted kernel by calling the kernel switching return instruction. The trusted kernel can restore the trusted zone from the trusted kernel stack space. In some embodiments, the trusted zone is a zone before the trusted kernel is switched to the non-trusted kernel in response to the non-trusted interrupt.

In some embodiments, the non-trusted kernel can modify a starting kernel flag bit in the program status register and switch to the trusted kernel by executing the kernel switching return instruction. The trusted kernel can restore the trusted zone from the trusted kernel stack space. In some embodiments, the trusted zone refers to a zone before the trusted kernel switches to the non-trusted kernel for the first time.

According to the technical solutions provided in the present disclosure, the trusted kernel-based anti-attack data processor can provide an underlying software protection mechanism for switching entries of the trusted kernel. Security during the switching process between a trusted kernel and a non-trusted kernel can be improved.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of an exemplary architecture of a trusted kernel-based anti-attack data processor according to some embodiments of the present disclosure.

FIG. 2 is a schematic diagram illustrating an exemplary process of a data processor executing a kernel switching instruction, according to some embodiments of the present disclosure.

FIG. 3 is a schematic diagram illustrating an exemplary process of a non-trusted kernel executing a kernel switching return instruction to return to a trusted kernel after the trusted kernel responds to an interrupt of the non-trusted kernel, according to some embodiments of the present disclosure.

FIG. 4 is a schematic diagram illustrating an exemplary process of an illegal kernel switching exception, according to some embodiments of the present disclosure.

DETAILED DESCRIPTION

To further describe the objectives, technical solutions and advantages of the embodiments of the present disclosure, the technical solutions in some exemplary embodiments of the present disclosure will be described in the following with reference to the accompanying drawings. It is appreciated that the embodiments described herein are merely some exemplary embodiments of the present disclosure. Based on the embodiments in the present disclosure, other embodiments can be obtained by those of ordinary skill in the art based on the principles described herein. Such embodiments shall all be encompassed in the protection scope of the present disclosure.

According to some embodiments of the present disclosure, trusted kernel-based anti-attack data processor is provided. FIG. 1 shows a schematic diagram of an exemplary architecture of a data processor 100 according to some embodiments the present disclosure. As shown in FIG. 1, the data processor 100 includes a trusted kernel exception vector table 110, a trusted kernel stack pointer register 120, and a trusted zone 130 in a trusted kernel stack space.

In some embodiments, trusted kernel exception vector table 110 can include two kinds of handling entries of kernel switching, e.g., a kernel switching instruction exception entry 111 and a trusted interrupt handling entry 112. When the data processor performs kernel switching from a non-trusted kernel to a trusted kernel, the trusted kernel can locate the handling entry for the kernel switching and perform the switching. Locating the handling entry for the kernel switching can be implemented in different manners.

Trusted kernel stack pointer register 120 is configured to store an independent stack pointer (e.g., a trusted kernel stack pointer) of the trusted kernel, the stack pointer pointing to a trusted kernel stack space. A trusted zone 130 can be saved in the trusted kernel stack space. Trusted zone 130 can include a current trusted kernel context. As shown in FIG. 1, trusted zone 130 in a trusted kernel stack space can include a program status register 131, a program pointer 132, and a general register 133 before the trusted kernel is switched last time. Further, program status register 131 can include a flag bit of a starting kernel. In some embodiments, the kernel switching can be implemented through at least one of a kernel switching instruction, a kernel switching return instruction, or an interrupt response. In some embodiments, when the kernel switching is performed by using the kernel switching return instruction, it can be determined, according to a flag bit of the starting kernel in the program status register 131, whether to return to the starting kernel or stay in the current kernel.

In some embodiments, when the kernel switching is performed by using the kernel switching instruction or the kernel switching return instruction, the trusted kernel can locate a kernel switching instruction exception entry (such as kernel switching instruction exception entry 111), according to an entry vector table called by a cross-kernel task of the trusted kernel. When the kernel switching is performed by using the interrupt response, the trusted kernel can locate the trusted interrupt handling entry (such as trusted interrupt handling entry 112), according to the trusted kernel exception vector table (such as trusted kernel exception vector table 110).

FIG. 2 shows a schematic diagram illustrating an exemplary process 200 of a data processor executing a kernel switching instruction according to some embodiments of the present disclosure. As shown in FIG. 2, in step 201, the data processor executes a kernel switching instruction in the non-trusted kernel. The data processor stores a non-trusted zone located in the non-trusted kernel and switches the non-trusted kernel to the trusted kernel through a switching process.

Further, in step 202, the data processor locates a kernel switching instruction exception entry in the trusted kernel exception vector table and performs kernel switching. In step 203, a kernel switching exception handling code of the trusted kernel executes a kernel switching instruction. In step 204, the trusted kernel returns to the non-trusted kernel through a switching process. The data processor can resume execution after restoring the non-trusted zone.

FIG. 3 is a schematic diagram illustrating an exemplary process 300 of a non-trusted kernel executing a kernel switching return instruction to return to a trusted kernel after the trusted kernel responds to an interrupt of the non-trusted kernel, according to some embodiments of the present disclosure. As shown in FIG. 3, the data processor runs in a trusted kernel. When an interrupt occurs in a non-trusted kernel (step 301), the data processor saves a trusted zone into a trusted kernel stack space. The data processor can then switch to the non-trusted kernel through a switching process (step 302), to respond to the interrupt. In some embodiments, a trusted kernel stack pointer register is configured to store a trusted kernel stack pointer that points to the foregoing trusted kernel stack space.

Further, in step 303, the non-trusted kernel switches to the trusted kernel through a kernel switching instruction executed by an interrupt handling function. In step 304, the data processor resumes execution after restoring the trusted zone, according to the trusted kernel stack space that the trusted kernel stack pointer of the trusted kernel stack pointer register points to.

FIG. 4 is a schematic diagram illustrating an exemplary process 400 of an illegal kernel switching exception according to some embodiments of the present disclosure. As shown in FIG. 4, in step 401, the trusted kernel is provided with a zone before the trusted kernel proactively switches to the non-trusted kernel for the first time. The initial zone can be saved in the trusted kernel stack space that the trusted kernel stack pointer points to. In step 402, the trusted kernel is switched to the non-trusted kernel by executing the kernel switching instruction.

Further, in step 403, the non-trusted kernel modifies a flag bit of a starting kernel in the program status register and executes the kernel switching return instruction for switching to the trusted kernel. The data processor switches to the trusted kernel and resumes execution, after saving the non-trusted kernel zone.

In step 404, the data processor restores the trusted zone according to the trusted kernel stack space that the trusted kernel stack pointer points to. In step 405, after the data processor executes an illegal kernel switching exception handling code, the data processor can restart or discard the exception, thereby preventing illegal kernel intrusions.

According to some embodiments, the trusted kernel-based anti-attack data processors provided in the present disclosure can provide an underlying software protection mechanism for switching entries of the trusted kernel. Therefore, security of the switching process between a trusted kernel and a non-trusted kernel can be improved.

It is appreciated that the above descriptions are merely examples of some embodiments of the present disclosure, and they do not constitute any improper limit on the protection scope of the present disclosure. Variations or replacements can be made by a person skilled in the art consistent with the present disclosure. Such variations or replacements shall all be encompassed in the protection scope of the present disclosure defined by the following claims. 

The invention claimed is:
 1. A trusted kernel-based anti-attack data processor, comprising: a trusted kernel exception vector table configured to provide a handling entry for kernel switching; a trusted kernel stack pointer register configured to store a trusted kernel stack pointer that points to a trusted kernel stack space of a trusted kernel; and a trusted zone in the trusted kernel stack space, the trusted zone including a program status register configured to store a flag bit of a starting kernel for kernel switching; wherein: the data processor is configured to locate the handling entry for kernel switching and to perform the kernel switching by at least one of a kernel switching instruction, a kernel switching return instruction, or an interrupt response, and the trusted kernel is configured to restore the trusted zone from the trusted kernel stack space in response to the starting kernel flag bit in the program status register having been modified by the non-trusted kernel and the non-trusted kernel having been switched to the trusted kernel.
 2. The data processor according to claim 1, wherein the handling entry for kernel switching includes at least one of a kernel switching instruction exception entry of the kernel switching instruction and a trusted interrupt handling entry of the kernel switching instruction.
 3. The data processor according to claim 2, wherein when the data processor performs the kernel switching by the kernel switching return instruction, a determination is made whether to return to the starting kernel or stay in a current kernel based on the flag bit in the program status register.
 4. The data processor according to claim 2, wherein the data processor is configured to locate the kernel switching instruction exception entry through an entry vector table called by a cross-kernel task.
 5. The data processor according to claim 2, wherein the trusted kernel is configured to locate the trusted interrupt handling entry through the trusted kernel exception vector table.
 6. The data processor according to claim 2, wherein when the trusted kernel is switched to a non-trusted kernel in response to a non-trusted interrupt, the trusted kernel is configured to save the trusted zone in the trusted kernel stack space; and after the non-trusted interrupt is handled by the non-trusted kernel, the trusted kernel is configured to restore the trusted zone when the non-trusted kernel is switched to the trusted kernel.
 7. The data processor according to claim 6, wherein the trusted zone includes a zone before the trusted kernel is switched to the non-trusted kernel in response to the non-trusted interrupt.
 8. The data processor according to claim 6, wherein the trusted zone includes a zone before the trusted kernel switches to the non-trusted kernel for a first time. 